//
//  CustomView.m
//  小汽车
//
//  Created by mill on 15/1/8.
//  Copyright (c) 2015年 蓝欧科技. All rights reserved.
//

#import "CustomView.h"
#import "MainViewController.h"
@implementation CustomView

- (void)dealloc
{
    [_button release];
    [_label release];
    [_imageView release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width / 8 * 3 , self.frame.size.height/ 7, self.frame.size.width / 4 , self.frame.size.height/4)];
        [self addSubview:_imageView];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, self.imageView.frame.size.height + _imageView.frame.origin.y +5, self.frame.size.width, self.frame.size.height / 3)];
        _label.font = [UIFont systemFontOfSize:13];
        _label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_label];
        
        self.button = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
        _button.alpha = 0.05;
        
        [self addSubview:_button];
        [_button release];
    }
    return self;
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
